home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / usr_-_Usr_Files / INCLUDE / SYSCALL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-17  |  656 b   |  37 lines

  1. #ifndef _SYSCALL_H
  2. #define _SYSCALL_H
  3.  
  4. #include <features.h>
  5. #include <sys/syscall.h>
  6. #include <errno.h>
  7.  
  8. #ifndef __MAX_ERRNO
  9. #define __MAX_ERRNO 4096
  10. #endif
  11.  
  12. /* In case of returning a memory address, negative values may
  13.  * not mean error.
  14.  */
  15. #ifdef __CHECK_RETURN_ADDR
  16. #define __check_errno(__res)    \
  17.     ((__res) >= 0 || (__res) < -__MAX_ERRNO)
  18. #else
  19. #define __check_errno(__res)    ((__res) >= 0)
  20. #endif
  21.  
  22. __BEGIN_DECLS
  23.  
  24. extern    int syscall __P ((int __number, ...));
  25.  
  26. __END_DECLS
  27.  
  28. #if defined(__i386__)
  29. # include <i386/syscall.h>
  30. #elif defined (__mc68000__)
  31. # include <m68k/syscall.h>
  32. #else
  33. # error architecture not supported by Linux C library
  34. #endif
  35.  
  36. #endif
  37.